import {Component,useState} from 'react'
import {connect} from 'react-redux'
import {View,Button} from "@tarojs/components";
import { AtList,AtListItem,AtModal, AtModalHeader, AtModalContent, AtModalAction } from "taro-ui"
import Taro from '@tarojs/taro'
import { AtMessage } from 'taro-ui'
export default function () {
  let objs = {
    isOpened:false
  }
  const  [ obj ,setObj ] = useState(objs)
  const handleClick = ()=>{
    console.log(obj)
   setObj({
     isOpened:true
   })
  }
  return <View>
    <AtList>
      <AtListItem title='弹框' onClick={handleClick} />
      <AtListItem title='标题文字' arrow='right' />
      <AtListItem title='标题文字' extraText='详细信息' />
      <AtListItem title='禁用状态' disabled extraText='详细信息' />
    </AtList>
    <AtModal isOpened = {obj.isOpened}>
      <AtModalHeader>标题</AtModalHeader>
      <AtModalContent>
        这里是正文内容，欢迎加入京东凹凸实验室
        这里是正文内容，欢迎加入京东凹凸实验室
        这里是正文内容，欢迎加入京东凹凸实验室
      </AtModalContent>
      <AtModalAction> <Button onClick={()=>setObj({isOpened:false})}>取消</Button> <Button onClick={()=>setObj({isOpened:false})}>确定</Button> </AtModalAction>
    </AtModal>
  </View>
}
